package inet.app.view.activity;

import java.net.Socket;

import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;
import android.media.MediaPlayer;
import android.widget.Toast;

@ReportsCrashes(
	      formKey = "", // This is required for backward compatibility but not used
	      formUri = "http://www.bugsense.com/api/acra?api_key=2559a727"
	  )

public class MyApp extends Application {

	public static int lastPosition = 0;
	public static boolean isDebugTuongThuatTT = false;
	public boolean isRunning = true;
	public boolean kill = false;
	public boolean canNext = false, isBxh = false;
	public int TYPE_ORDER = 0;
	public Socket _socket = null;
	public String ip = "210.211.127.172";
	public int port = 1890;
	public String appid = "";
	public MediaPlayer media;
	public String json;
	public String code = "XSTD";
	public String codeTV = "XSTD";
	public String nameTV = "Thủ Đô";
	public boolean isFirstLaunchTuVan = true;
	public static String MSISDN="";
	
	@Override
	 public void onLowMemory() {
		Toast.makeText(getApplicationContext(), "Tràn bộ nhớ", Toast.LENGTH_LONG).show();
	  System.out.println("TRAN BO NHO=====================>> HÚ HÚ HÚ");
	 }
//	public static String getMSISDN() {
//		return MSISDN;
//	}
//
//	public static void setMSISDN(String mSISDN) {
//		MSISDN = mSISDN;
//	}

	public String getNameTV() {
		return nameTV;
	}

	public void setNameTV(String nameTV) {
		this.nameTV = nameTV;
	}

	public String getCodeTV() {
		return codeTV;
	}

	public void setCodeTV(String codeTV) {
		this.codeTV = codeTV;
	}

	private String selectCode = "DAU";
	private String selectName = "Đầu";

	public String getSelectCode() {
		return selectCode;
	}

	public String getSelectName() {
		return selectName;
	}

	public void setSelectName(String selectName) {
		this.selectName = selectName;
	}

	public void setSelectCode(String selectCode) {
		this.selectCode = selectCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public boolean isCanNext() {
		return canNext;
	}

	public void setCanNext(boolean canNext) {
		this.canNext = canNext;
	}

	public boolean isRunning() {
		return isRunning;
	}

	public void setRunning(boolean isRunning) {
		this.isRunning = isRunning;
	}

	public int getTYPE_ORDER() {
		return TYPE_ORDER;
	}

	public void setTYPE_ORDER(int tYPEORDER) {
		TYPE_ORDER = tYPEORDER;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public boolean isBxh() {
		return isBxh;
	}

	public void setBxh(boolean isBxh) {
		this.isBxh = isBxh;
	}

	public Socket get_socket() {
		return _socket;
	}

	public void set_socket(Socket socket) {
		_socket = socket;
	}

	public boolean isKill() {
		return kill;
	}

	public void setKill(boolean kill) {
		this.kill = kill;
	}

	public String getJson() {
		return json;
	}

	public void setJson(String json) {
		this.json = json;
	}

	public String getAppid() {
		return appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}

	public MediaPlayer getMedia() {
		return media;
	}

	public void setMedia(MediaPlayer media) {
		this.media = media;
	}
	
	@Override
	public void onCreate() {
		super.onCreate();
		ACRA.init(this);
	}

}
